www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\adminCollection\Admin_ItemAttribute.asp
<%@language=vbscript codepage=936 %> <% response.buffer=true %> <!--#include file="inc/conn.asp"--> <!--#include file="inc/function.asp"--> <!--#include file="Admin_ChkPurview.asp"--> <% Dim SqlItem,RsItem,Action,FoundErr,ErrMsg Dim ItemID,ItemName,ChannelID,ClassID,SpecialID Dim PaginationType,MaxCharPerPage,ReadLevel,Stars,ReadPoint,Hits,UpdateType,UpdateTime,IncludePicYn,DefaultPicYn Dim OnTop,Elite,Hot,SkinID,TemplateID Dim Script_Iframe,Script_Object,Script_Script,Script_Div,Script_Class,Script_Span,Script_Img,Script_Font,Script_A,Script_Html,Script_Table,Script_Tr,Script_Td Dim CollecListNum,CollecNewsNum,Passed,SaveFiles,CollecOrder,LinkUrlYn,InputerType,Inputer,EditorType,Editor,ShowCommentLink FoundErr=False ItemID=Trim(Request("ItemID")) Action=Trim(Request("Action")) If ItemID="" Then FoundErr=True ErrMsg=ErrMsg & "<br><li>参数错误,项目ID不能为空!</li>" Else ItemID=Clng(ItemID) End If If FoundErr<>True Then Call GetTest() End If If FoundErr<>True Then Call Main() End If '关闭数据库链接 Call CloseConn() Call CloseConnItem() %> <%Sub Main %> <html> <head> <title>采集系统</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link rel="stylesheet" type="text/css" href="Admin_Style.css"> <%Call SetChannel()%> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border"> <tr> <td height="22" colspan="2" align="center" class="topbg"><strong>采 集 系 统 模 板 管 理</td> </tr> <tr class="tdbg"> <td width="65" height="30"><strong>管理导航:</strong></td> <td height="30">项目编辑 >> <a href="Admin_ItemModify.asp?ItemID=<%=ItemID%>">基本设置</a> >> <a href="Admin_ItemModify2.asp?ItemID=<%=ItemID%>">列表设置</a> >> <a href="Admin_ItemModify3.asp?ItemID=<%=ItemID%>">链接设置</a> >> <a href="Admin_ItemModify4.asp?ItemID=<%=ItemID%>">正文设置</a> >> <a href="Admin_ItemModify5.asp?ItemID=<%=ItemID%>">采样测试</a> >> <a href="Admin_ItemAttribute.asp?ItemID=<%=ItemID%>"><font color=red>属性设置</font></a> >> 完成</td> </tr> </table> <br> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border"> <tr> <td height="22" colspan="2" class="title"> <div align="center"><strong>编 辑 项 目--属 性 设 置</strong></div></td> </tr> </table> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" class="tdbg"> <form method="post" action="Admin_ItemSuccess.asp" name="myform"> <tr class="tdbg"> <td height="30" width="20%" align="right"><b>项目名称:</b></td> <td><input name='ItemName' type='text' id='ItemName' value='<%=ItemName%>' size='27' maxlength='30'></td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><strong> 所属频道:</strong></td> <td><select ID="ChannelID" name="ChannelID" onChange="changelocation(document.myform.ChannelID.options[document.myform.ChannelID.selectedIndex].value)"><%call Admin_ShowChannel_Option(ChannelID)%></select> </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><strong> 所属栏目:</strong></td> <td><select name="ClassID" ID="ClassID"><%call Admin_ShowClass_Option(ChannelID,ClassID)%></select> </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><strong> 所属专题:</strong></td> <td class="tdbg"><%call Admin_ShowSpecial_Option(ChannelID,SpecialID)%> </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><b>内容分页方式:</b></td> <td><select name="PaginationType"> <option value="1" <%If PaginationType=1 Then response.write "selected"%>>自动分页</option> <option value="0" <%If PaginationType=0 Then response.write "selected"%>>手动分页</option> </select> <!--自动分页时的每页大约字符数(包含HTML标记):<input name="MaxCharPerPage" type="text" value="<%=MaxCharPerPage%>" size="8" maxlength="8"--> </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><b>文章阅读等级:</b></td> <td> <select size="1" name="ReadLevel"> <% biaog="[ND_userGroup]" set rs8=server.CreateObject("adodb.recordset") rs8.open "select * from "&biaog&" order by clng(grades) asc",conn,1,1 do while not rs8.eof %> <option value='<%=rs8("id")%>' <%if cstr(rs8("id"))=cstr(ReadLevel) then response.write "selected"%> ><%=rs8("name")%></option> <%rs8.movenext loop %> </select> <FONT color=#0000ff>只有具有相应权限的人才能阅读此文章。</FONT> </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><b>文章评分等级:</b></td> <td><select name="Stars"> <option value="5" <%If Stars=5 Then response.write "selected"%>>★★★★★</option> <option value="4" <%If Stars=4 Then response.write "selected"%>>★★★★</option> <option value="3" <%If Stars=3 Then response.write "selected"%>>★★★</option> <option value="2" <%If Stars=2 Then response.write "selected"%>>★★</option> <option value="1" <%If Stars=1 Then response.write "selected"%>>★</option> <option value="0" <%If Stars=0 Then response.write "selected"%>>无</option> </select> </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><b>文章阅读点数:</b></td> <td><input name='ReadPoint' type='text' id='ReadPoint' value='<%=ReadPoint%>' size='5' maxlength='3'> <font color='#0000FF'>如果大于0,则用户阅读此文章时将消耗相应点数。(对游客和管理员无效)</font> </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><b>点击数初始值:</b></td> <td><input name="Hits" type="text" id="Hits" value="<%=Hits%>" size="10" maxlength="10"> <font color='#0000FF'>这功能是提供给管理员作弊用的。不过尽量不要用呀!^_^</font> </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><b>新闻录入时间:</b></td> <td><input name="UpdateType" type="radio" value="0" <%If UpdateType= 0 Then Response.write "checked"%> style="border: 0px;background-color: #eeeeee;">当前时间 <input name="UpdateType" type="radio" value="1" <%If UpdateType=1 Then Response.write "checked"%> style="border: 0px;background-color: #eeeeee;">标签中的时间 <input name="UpdateType" type="radio" value="2" <%If UpdateType= 2 Then Response.write "checked"%> style="border: 0px;background-color: #eeeeee;">自定义: <input name="UpdateTime" type="text" value="<%=UpdateTime%>"> </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><b>新闻录入:</b></td> <td><input name="InputerType" type="radio" value="0" <%If InputerType= 0 Then Response.write "checked"%> style="border: 0px;background-color: #eeeeee;">当前用户 <input name="InputerType" type="radio" value="1" <%If InputerType=1 Then Response.write "checked"%> style="border: 0px;background-color: #eeeeee;">指定用户 <input name="Inputer" type="text" value="<%=Inputer%>"> </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><b>责任编辑:</b></td> <td><input name="EditorType" type="radio" value="0" <%If EditorType= 0 Then Response.write "checked"%> style="border: 0px;background-color: #eeeeee;">当前用户 <input name="EditorType" type="radio" value="1" <%If EditorType=1 Then Response.write "checked"%> style="border: 0px;background-color: #eeeeee;">指定用户 <input name="Editor" type="text" value="<%=Editor%>"> </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><b>新闻性质:</b></td> <td> <input name="IncludePicYn" type="checkbox" value="yes" <%If IncludePicYn=-1 Then Response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> 包含图片 <input name="DefaultPicYn" type="checkbox" value="yes" <%If DefaultPicYn=-1 Then Response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> 首页图片 <input name="OnTop" type="checkbox" value="yes" <%If OnTop=-1 Then Response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> 固顶文章 <input name="Elite" type=checkbox value="yes" <%If Elite=-1 Then Response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> 推荐文章 <input name="Hot" type="checkbox" value="yes" <%If Hot=-1 Then Response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> 热点文章 </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><b>评论链接:</b></td> <td> <input name="ShowCommentLink" type="radio" id="ShowCommentLink" value="1" <%If ShowCommentLink=True Then Response.write "Checked"%>>显示评论链接 <input name="ShowCommentLink" type="radio" id="ShowCommentLink" value="0" <%If ShowCommentLink=False Then Response.write "Checked"%>>不显示评论链接 </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><b>配色风格:</b></td> <td><select name='SkinID' id='SkinID'><option value='0' selected>默认风格</option></select> </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><b>版面设计模板:</b></td> <td><select name='TemplateID' id='TemplateID'><option value='0' selected>默认风格</option></select> </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"><b>标签过滤:</b></td> <td> <input name="Script_Iframe" type="checkbox" value="yes" <%If Script_Iframe=-1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> Iframe <input name="Script_Object" type="checkbox" value="yes" <%If Script_Object=-1 Then response.write "checked"%> onclick='return confirm("确定要选择该标记吗?这将删除正文中的所有Object标记,结果将导致该文章中的所有Flash动画被删除!");' style="border: 0px;background-color: #eeeeee;"> Object <input name="Script_Script" type="checkbox" value="yes" <%If Script_Script=-1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> Script <input name="Script_Div" type="checkbox" value="yes" <%If Script_Div=-1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> Div <input name="Script_Class" type="checkbox" value="yes" <%If Script_Class=-1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> Class <input name="Script_Table" type="checkbox" value="yes" <%If Script_Table=-1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> Table <input name="Script_Tr" type="checkbox" value="yes" <%If Script_Tr=-1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> Tr <br> <input name="Script_Span" type="checkbox" value="yes" <%If Script_Span=-1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> Span <input name="Script_Img" type="checkbox" value="yes" <%If Script_Img=-1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> Img <input name="Script_Font" type="checkbox" value="yes" <%If Script_Font=-1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> Font <input name="Script_A" type="checkbox" value="yes" <%If Script_A=-1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> A <input name="Script_Html" type="checkbox" value="yes" <%If Script_Html=-1 Then response.write "checked"%> onclick='return confirm("确定要选择该标记吗?这将删除正文中的所有Html标记,结果将导致该文章的可阅读性降低!");' style="border: 0px;background-color: #eeeeee;"> Html <input name="Script_Td" type="checkbox" value="yes" <%If Script_Td=-1 Then response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> Td </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"> <b>列表深度:</b></td> <td> <input name="CollecListNum" type="text" id="CollecListNum" value="<%=CollecListNum%>" size="10" maxlength="10"> <font color='#0000FF'>0为所有的列表</font></td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"> <b>新闻数量:</b></td> <td> <input name="CollecNewsNum" type="text" id="CollecNewsNum" value="<%=CollecNewsNum%>" size="10" maxlength="10"> <font color='#0000FF'>0为所有的新闻<span lang="en-us">(</span>每一列表的新闻限制数量<span lang="en-us">)</span></font></td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"> <b>采集选项:</b></td> <td> <input name="Passed" type="checkbox" value="yes" <%if Passed=-1 then response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> 立即发布 <input name="SaveFiles" type="checkbox" value="yes" <%if SaveFiles=-1 then response.write "checked"%> <%If IsObjInstalled(fssoo_nd_var_str_x_customx)=False Then Response.Write "disabled"%> style="border: 0px;background-color: #eeeeee;"> 保存图片 <input name="CollecOrder" type="checkbox" value="yes" <%if CollecOrder=-1 then response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> 倒序采集 <input name="LinkUrlYn" type="checkbox" value="yes" <%if LinkUrlYn=-1 then response.write "checked"%> style="border: 0px;background-color: #eeeeee;"> 外部链接 </td> </tr> <tr class="tdbg"> <td height="30" width="20%" align="right"></td> <td align-"center"><center> <input type="hidden" value="<%=ItemID%>" name="ItemID"> <input type="submit" value=" 完 成 " name="submit" style="cursor: hand;background-color: #cccccc;"> </center> </td> </tr> </form> </table> <!--#include file="Admin_ItemFoot.asp"--> </body> </html> <%End Sub%> <% Sub GetTest() SqlItem="Select * from Item Where ItemID=" & ItemID Set RsItem=server.CreateObject("adodb.recordset") RsItem.Open SqlItem,ConnItem,1,1 If RsItem.Eof And RsItem.Bof Then FoundErr=True ErrMsg=ErrMsg & "<br><li>参数错误,找不到该项目</li>" Else ItemName=RsItem("ItemName") ChannelID=RsItem("ChannelID") ClassID=RsItem("ClassID") SpecialID=RsItem("SpecialID") PaginationType=RsItem("PaginationType") MaxCharPerPage=RsItem("MaxCharPerPage") ReadLevel=RsItem("ReadLevel") Stars=RsItem("Stars") ReadPoint=RsItem("ReadPoint") Hits=RsItem("Hits") UpdateType=RsItem("UpdateType") UpdateTime=RsItem("UpdateTime") IncludePicYn=RsItem("IncludePicYn") DefaultPicYn=RsItem("DefaultPicYn") OnTop=RsItem("OnTop") Elite=RsItem("Elite") Hot=RsItem("Hot") SkinID=RsItem("SkinID") TemplateID=RsItem("TemplateID") Script_Iframe=RsItem("Script_Iframe") Script_Object=RsItem("Script_Object") Script_Script=RsItem("Script_Script") Script_Div=RsItem("Script_Div") Script_Class=RsItem("Script_Class") Script_Span=RsItem("Script_Span") Script_Img=RsItem("Script_Img") Script_Font=RsItem("Script_Font") Script_A=RsItem("Script_A") Script_Html=RsItem("Script_Html") Passed=RsItem("Passed") SaveFiles=RsItem("SaveFiles") CollecOrder=RsItem("CollecOrder") LinkUrlYn=RsItem("LinkUrlYn") CollecListNum=RsItem("CollecListNum") CollecNewsNum=RsItem("CollecNewsNum") InputerType=RsItem("InputerType") Inputer=RsItem("Inputer") EditorType=RsItem("EditorType") Editor=RsItem("Editor") ShowCommentLink=RsItem("ShowCommentLink") Script_Table=RsItem("Script_Table") Script_Tr=RsItem("Script_Tr") Script_Td=RsItem("Script_Td") End If RsItem.Close Set RsItem=Nothing End Sub %> <% biao="[ND_Article_class]" dim nnnchhnnn2 dim i_Class function next_cen(pid_list,deepth) set rs=server.CreateObject("adodb.recordset") pppcid="-123" if pid_list<>"" then ppplista=split(pid_list,",") ppplistaubd=ubound(ppplista)-1 pppcid=ppplista(ppplistaubd) end if rs.open "select * from "&biao&" where ((deepth="&deepth&" and ((parent_id_list like '%"&pid_list&"%') or (parent_id='"&pppcid&"'))) and sys_content_type='"&nnnchhnnn&"') order by orders asc",conn,1,1 if pid_list<>"" then lista=split(pid_list,",") numa=ubound(lista) p_id=cstr(lista(numa)) else p_id=0 end if do while not rs.eof pid_list222=rs("parent_id_list")&","&rs("id")&"," deepth222=rs("deepth")+1 set rs2=server.CreateObject("adodb.recordset") rs2.open "select * from "&biao&" where ((deepth="&deepth222&" and ((parent_id_list like '%"&pid_list222&"%') or (parent_id='"&rs("id")&"'))) and sys_content_type='"&nnnchhnnn&"') order by orders asc",conn,1,1 if rs2.eof then if pid_list<>"" then lista=split(pid_list,",") numa=ubound(lista) p_id=cstr(lista(numa-1)) else p_id=0 end if if p_id=0 then p_id=-1 'response.write "<level1 id="""&rs("id")&""" parentTypeID="""&p_id&""" caption="""&rs("ClassName")&""" PRI=""1"" explain="""&rs("id")&"""/>"&vbcrlf %> <% sssaapp="" for iiiii1=1 to cint(deepth222) if iiiii1=cint(deepth222) then sssaapp=sssaapp&"├" else sssaapp=sssaapp&"│" end if next %> arr_class[<%=i_Class%>] = new Array("<%=nnnchhnnn2%>","<%=rs("id")%>","<%=sssaapp&rs("classname")%>"); <%i_Class=i_Class+1%> <% if not rs.eof then rs.movenext if rs.eof or rs.bof then 'response.write "</level0>" 'call next_cen_class(pid_list222,deepth222) exit function else need_benji_next=1 end if else 'response.write "<level0 id="""&rs("id")&""" parentTypeID=""" 'if deepth=0 then response.write "-1" else response.write p_id 'response.write """ caption="""&rs("ClassName")&""" PRI=""2"" explain="""&rs("id")&""" >"&vbcrlf %> <% sssaapp="" for iiiii1=1 to cint(deepth222) if iiiii1=cint(deepth222) then sssaapp=sssaapp&"├" else sssaapp=sssaapp&"│" end if next %> arr_class[<%=i_Class%>] = new Array("<%=nnnchhnnn2%>","<%=rs("id")%>","<%=sssaapp&rs("classname")%>"); <%i_Class=i_Class+1%> <% call next_cen(pid_list222,deepth222) if not rs.eof then rs.movenext need_benji_next=1 if rs.eof or rs.bof then 'if deepth<>0 then response.write "</level0>" 'call next_cen_class(pid_list222,deepth222) exit function end if end if if need_benji_next=0 then exit do end if need_benji_next=0 loop end function Sub SetChannel Dim Arr_Channel,i_Channel,i_Special,tmpDepth,i,ArrShowLine(20) Dim Rs,Sql,ClassID,ClassName,SpecialID,SpecialName Set Rs=server.createobject("adodb.recordset") Sql = "select * from ND_channel where lanmu_type='Article' order by clng(orders) ASC" Rs.Open Sql,Conn,1,1 If Not Rs.Eof Then Arr_Channel=Rs.GetRows() End If Rs.Close Set Rs=Nothing If IsArray(Arr_Channel)= True then i_Class=0 i_Special=0 For i=0 To Ubound(ArrShowLine) ArrShowLine(i)=False Next %> <script language = "JavaScript"> var count_class; var count_special; arr_class = new Array(); arr_special= new Array(); <% For i_Channel=0 To Ubound(Arr_Channel,2) Set Rs=server.createobject("adodb.recordset") aasss=Arr_Channel(0,i_Channel) Sqlc ="select * from ND_channel where id="&aasss Set Rsc1=server.CreateObject("adodb.recordset") Rsc1.Open Sqlc,Conn,1,1 nnnchhnnn=rsc1("sys_content_type_name") nnnchhnnn2=aasss Sql = "select * from ND_Article_class where sys_content_type='" & Rsc1("sys_content_type_name") & "'" Rs.Open Sql,Conn,1,1 %> arr_class[<%=i_Class%>] = new Array("<%=Arr_Channel(0,i_Channel)%>","0","请选择栏目"); <% i_Class=i_Class+1 call next_cen("",0) Set Rs=server.createobject("adodb.recordset") Sql = "select * from ND_Article_Special where sys_content_type='" & Rsc1("sys_content_type_name") & "'" Rs.Open Sql,Conn,1,1 %> arr_special[<%=i_Special%>] = new Array("<%=Arr_Channel(0,i_Channel)%>","0","不属于任何专题"); <% i_Special=i_Special+1 If Not Rs.Eof then Do While Not Rs.Eof %> arr_special[<%=i_Special%>] = new Array("<%=Arr_Channel(0,i_Channel)%>","<%=Rs("ID")%>","<%=Rs("SpecialName")%>"); <% i_Special=i_Special + 1 Rs.MoveNext Loop End if Rs.Close Set Rs=Nothing Next %> count_class=<%=i_Class%>; count_special=<%=i_Special%>; function changelocation(locationid) { document.myform.ClassID.length = 0; document.myform.SpecialID.length = 0; var locationid=locationid; var i; for (i=0;i < count_class; i++) { if (arr_class[i][0] == locationid) { document.myform.ClassID.options[document.myform.ClassID.length] = new Option(arr_class[i][2], arr_class[i][1]); } } for (i=0;i < count_special; i++) { if (arr_special[i][0] == locationid) { document.myform.SpecialID.options[document.myform.SpecialID.length] = new Option(arr_special[i][2], arr_special[i][1]); } } } </script> <% End if End sub %>